Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: impl put_many and reuse column families #412

Merged
merged 5 commits into from
Oct 25, 2022
Merged

perf: impl put_many and reuse column families #412

merged 5 commits into from
Oct 25, 2022

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Oct 25, 2022

This requires getting rid of a lot of async in the store. Async only in the public interface.

I want to do some more reorg here, but in the interest of getting something on main soon I will refrain from it...


#[tracing::instrument(skip(self))]
pub async fn get(&self, cid: &Cid) -> Result<Option<DBPinnableSlice<'_>>> {
self.get0(cid, &self.cfs()?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about using `spawn_blocking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I noticed this as well now that I removed all the async. It was not using spawn_blocking before, but it probably should.

But I got a branch where I really clean things up, so I would prefer to introduce spawn_blocking there. https://github.com/n0-computer/iroh/tree/rklaehn/local-gb

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@rklaehn
Copy link
Contributor Author

rklaehn commented Oct 25, 2022

This branch:

cargo run --release -p iroh -- add --recursive ~/projects_git/linux  92.11s user 3.66s system 369% cpu 25.941 total

Main:

cargo run --release -p iroh -- add --recursive ~/projects_git/linux  38.62s user 11.35s system 186% cpu 26.856 total

@b5 b5 added this to the v0.1.0 milestone Oct 25, 2022
@dignifiedquire
Copy link
Contributor

@rklaehn did you switch up things? or does this make things slower?

@rklaehn rklaehn mentioned this pull request Oct 25, 2022
@Arqu
Copy link
Collaborator

Arqu commented Oct 25, 2022

@rklaehn did you switch up things? or does this make things slower?

If Im reading the above correct, it's 1 sec faster but uses more CPU cores (hence user time higher)

@b5 b5 merged commit 4cab5c7 into main Oct 25, 2022
@b5 b5 deleted the rklaehn/bulk-put branch October 25, 2022 20:51
@b5 b5 restored the rklaehn/bulk-put branch October 25, 2022 20:51
@Arqu Arqu deleted the rklaehn/bulk-put branch October 25, 2022 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants